const express = require('express');
const router = express.Router();
const { authenticate } = require('../middleware/auth');
const authController = require('../controllers/authController');

router.post('/register', authController.register);
router.post('/login', authController.login);
router.post('/loginUsername', authController.loginUsername);
router.post('/loginByPhone', authController.loginByPhone);

router.get('/me',authenticate, authController.getCurrentUser);
module.exports = router;